<!--conf
<sample>
              <product version="1.4" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Custom onRightClick handler</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
</head>

<body onresize="return true;" >
	
	<h1>Custom onRightClick handler</h1>
	<p>"onRightClick" event handler allows to set function called when cell is right clicked</p>
	 <div style="height:20px;">
		<div id="a_1" style="color:red;display:none">item was right clicked</div>
	</div>
	<table width="600px">
		<tr>
			<td>
				<div id="gridbox" style="width:100%;height:270px;background-color:white;"></div>
			</td>
		</tr>
	</table>
				
<br>

<script>

	function onButtonClick(rowId,cellId)
	{
		document.getElementById("a_1").style.display="block"; 
		document.getElementById("a_1").innerHTML="cell ("+rowId+","+cellId+ ") was right clicked"; 
		return false;
	}
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.attachEvent("onRightClick",onButtonClick);
	mygrid.setSkin("dhx_skyblue")
	mygrid.loadXML("../common/gridH_03_context_menu.xml");
</script>

</body>
</html>
